﻿@model  PagedList.IPagedList<Promike.site.Models.Photo>
@using PagedList.Mvc
@{
    ViewBag.Title = "Добро пожаловать в фотогалерею";
}
<link href="@Url.Content("/Content/PagedList.css")" rel="stylesheet" type="text/css"/>
<div id="container">
    @{
        foreach (var item in Model)
        {
            var src = "/Files/thumb/" + @item.PhysicalName;
            <div class="block" data-title="@item.FileName">
                <img class="crop-mini-image" src="@src" alt="@item.FileName" title="Рейтинг: @item.Clicks" onclick=" window.location = '/Photo/Image/@item.Id' "/>
            </div>
        }
    }
</div>
<div style="text-align: center;">
        @Html.PagedListPager(Model, page => Url.Action("Gallery", new { page, filterType=ViewBag.filterType}), 
            new PagedListRenderOptions { LinkToFirstPageFormat = "<<", 
               LinkToPreviousPageFormat = "Назад",
                LinkToNextPageFormat = "Вперед",
                LinkToLastPageFormat = ">>" })
</div>
@Scripts.Render("~/bundles/easing")
@Scripts.Render("~/bundles/floater")
<script type="text/javascript">
    $("#container").floater({
        duration: 300,
        easing: 'easeOutSine',
        boxClass: '.block',
        minimumMargin: 30,
        maximumMargin: 40,
        fluidHeight: true,
        callback: function () {
            console.log('callback');
        }
    });
</script>
		
@Scripts.Render("~/bundles/vk_up_back")


